package com.zr.repertory.warearea.mapper;

import com.zr.warehouse.pojo.WareAreaSelectVo;
import com.zr.warehouse.pojo.WareAreaVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * Created by HXH on 2019/11/21 0021.
 */
@Mapper
public interface WareAreaMapper {

    int queryCount(WareAreaSelectVo wareAreaSelectVo);

    List<WareAreaVo> queryData(WareAreaSelectVo wareAreaSelectVo);

    void addWareAreaVo(WareAreaVo wareAreaVo);

    @Select("select count(WareAreaId) from warearea where wareAreaCode=#{wareAreaCode}")
    int queryByWareAreaCode(String wareAreaCode);

    @Select("select count(WareAreaId) from warearea where wareAreaName=#{wareAreaName}")
    int queryByWarehouseName(String wareAreaName);
}
